<?php
// +----------------------------------------------------------------------
// | OneKeyAdmin [ Believe that you can do better ]
// +----------------------------------------------------------------------
// | Copyright (c) 2020-2023 http://onekeyadmin.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: MUKE <513038996@qq.com>
// +----------------------------------------------------------------------
namespace plugins\cms\api\validate;

use think\Validate;

class Product extends Validate
{
    protected $rule = [
        'id'          => 'require|number',
        'page'        => 'require|number',
        'status'      => 'number',
        'catalog_id'  => 'number',
        'product_sku' => 'require',
        'ids'         => 'require',
        'number'      => 'require|number',
    ];
    
    protected $scene = [
        'index'      => ['page','catalog_id','status'],
        'single'     => ['id','catalog_id'],
        'cartIndex'  => ['page'],
        'cartSave'   => ['id', 'product_sku'],
        'cartDelete' => ['ids'],
        'cartAas'    => ['id','number'],
    ];
}